﻿@using KRM.Core
@using KRM.Core.Library
@{
    ViewBag.Title = "Kybotech | Dashboard";
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.UrlLink = "home";
}
@*@section Scripts{
    <script src="/js/plugins/flot/jquery.flot.min.js"></script>
    <script src="/js/plugins/flot/jquery.flot.bar.order.min.js"></script>
    <script src="/js/plugins/flot/jquery.flot.pie.min.js"></script>
    <script src="/js/plugins/flot/jquery.flot.resize.min.js"></script>
    <script src="/hr/js/DashBoard.js" type="text/javascript"> </script>
}*@
<div class="row-fluid" style="padding-top: 20px;">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">Dashboard <small>statistics and more</small>
        </h3>
        @*<ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="icon-home"></i>
                <a href="/">Home</a>
                <i class="icon-angle-right"></i>
            </li>
            <li><a href="#">Dashboard</a></li>
        </ul>*@
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
@*<div class="row">
            <div class="col-md-6 col-sm-6">
               @Html.Action("Activities","Home")
            </div>
            <div class="col-md-6 col-sm-6">
               @Html.Action("LeaveToday","Home")
            </div>
            
         </div>*@

@if (Users.Current(User.Identity.Name).HasPermission(Permissions.UseKnowledgeBase))
{
    <div class="row-fluid">
        <div class="span3">
            <div class="dashboard-stat blue">
                <div class="visual">
                    <i class="icon-tasks"></i>
                </div>
                <div class="details">
                    <div class="number">
                        @(ViewBag.NewTaskWaitting ?? 0)
                    </div>
                    <div class="desc">
                        New Task Waitting
                    </div>
                </div>
                <a class="more" href="/Task/ViewTasks">View more <i class="m-icon-swapright m-icon-white"></i>
                </a>
            </div>
        </div>
        <div class="span3">
            <div class="dashboard-stat green">
                <div class="visual">
                    <i class="icon-shopping-cart"></i>
                </div>
                <div class="details">
                    <div class="number">@(ViewBag.NewOrders ?? 0)</div>
                    <div class="desc">New Orders Today</div>
                </div>
                <a class="more" href="/orderview/advancesearch">View more <i class="m-icon-swapright m-icon-white"></i>
                </a>
            </div>
        </div>
        <div class="span3">
            <div class="dashboard-stat purple">
                <div class="visual">
                    <i class=" icon-comments"></i>
                </div>
                <div class="details">
                    <div class="number">@ViewBag.PendingRDM</div>
                    <div class="desc">Pending RDM</div>
                </div>
                <a class="more" href="/rdm/approverdms">View more <i class="m-icon-swapright m-icon-white"></i>
                </a>
            </div>
        </div>
        <div class="span3">
            <div class="dashboard-stat yellow">
                <div class="visual">
                    <i class="icon-bar-chart"></i>
                </div>
                <div class="details">
                    <div class="number">@ViewBag.ValueToday £</div>
                    <div class="desc">Value Today</div>
                </div>
                <a class="more" href="/home/viewstatistics">View more <i class="m-icon-swapright m-icon-white"></i>
                </a>
            </div>
        </div>
    </div>
@*<div class="row-fluid">
    <div class="span12">
        <div class="box">
            <div class="box-title" style="padding-top: 0px;">
                <span style="font-size: 16px;line-height: 16px;"><i class="icon-bar-chart"></i> Site Performance</span>
                <div class="actions">
                    <a href="#" class="btn btn-mini content-slideUp"><i class="icon-angle-down"></i></a>
                </div>
            </div>
            <div class="box-content" style="padding-left: 0px;padding-right: 0px;">
                <div class="flot flot-line" style=""></div>
            </div>
        </div>
    </div>
</div>*@
    <div class="row-fluid" style="text-align: center; background-color: #0070af;">
        <img src="/img/kybotech.png" />
    </div>
}
else
{ 
    <div class="row-fluid" style="text-align: center; background-color: #0070af;">
        <img src="/img/kybotech.png" />
    </div>
}

@Html.Partial("Partial/_MessageResult")